import platform
from pathlib import Path

# Configuration file for the 'lit' test runner.

if platform.processor() == "aarch64":
    config.available_features.add("aarch64")

if (
    platform.system() == "Linux"
    and "amx_tile" in Path("/proc/cpuinfo").read_text()
):
    config.available_features.add("intel_amx")

def is_apple_silicon() -> bool:
    return platform.system() == "Darwin" and platform.processor() == "arm"

if is_apple_silicon():
    config.available_features.add("apple-silicon")
